import BaseInput from "@/components/ProForm/BaseInput.vue";
import BaseCascader from '@/components/ProForm/BaseCascader.vue'
import BaseCheckBox from '@/components/ProForm/BaseCheckBox.vue'
import BaseColorPicker from '@/components/ProForm/BaseColorPicker.vue'
import BaseDatePicker from '@/components/ProForm/BaseDatePicker.vue'
import BaseDateTimePicker from '@/components/ProForm/BaseDateTimePicker.vue'
import BaseInputNumber from '@/components/ProForm/BaseInputNumber.vue'
import BaseSelect from '@/components/ProForm/BaseSelect.vue'
import BaseSwitch from '@/components/ProForm/BaseSwitch.vue'
import BaseTimePicker from '@/components/ProForm/BaseTimePicker.vue'
import BaseTimeSelect from '@/components/ProForm/BaseTimeSelect.vue'
import BaseUpload from '@/components/ProForm/BaseUpload.vue'
import BaseDropdown from '@/components/ProForm/BaseDropdown.vue'




const options = []
export const addeditConfig = {
    formProps: { // 表单属性
        labelPosition: 'right',
        labelWidth: 'auto',
        row:true,

    },
    formItems: [{
            name: BaseInput,
            props: { 
                label: '名字',
                prop: 'name',
                borderBottom: true,
                span:12,
            },
            elProps: { 
                placeholder: '',
                clearable:true,
            },
            value: '' 
        },
        {
            name: BaseSelect,
            options: options,
            props: {
                label: '學校',
                prop: 'school_id',
                span: 12,
            },
            elProps: {
                placeholder: '',
                clearable: true,
                multiple: false,
            },
            value: ''
        },
        {
            name: BaseSelect,
            options: [{
                    value: 1,
                    label: '正常',
                },
                {
                    value: -1,
                    label: '禁用',
                },
            ],
            props: {
                label: '狀態',
                prop: 'status',
                span: 12,
            },
            elProps: {
                placeholder: '',
                clearable: true,
                multiple: false,
            },
            value: ''
        },
        {
            name: BaseColorPicker,
            props: {
                label: '顏色',
                prop: 'color',
                span: 12,
            },
            elProps: {
                placeholder: '',
                clearable: true,
                multiple: false,
            },
            value: ''
        },
        {
            name: BaseInputNumber,
            props: { 
                label: '教室排序',
                prop: 'sort',
                span:12,
            },
            elProps: { 
                placeholder: '',
                clearable:true,
                min:0
            },
            value: 1
        },
       
    ],
    rules: {
        name:{
            required:true,
            message:'请输入教室名稱'
        },
        school_id:{
            required:true,
            message:'请選擇學校'
        },
        status:{
            required:true,
            message:'请選擇教室狀態'
        },
        sort:{
            required:true,
            message:'请输入序號'
        },
        color:{
            required:true,
            message:'请選擇教室顏色'
        },
    }
}
